import React, { Component } from 'react'
import Styles from './index.less'
export default class Loading extends Component {
    render() {
        const { loading, children } = this.props
        return (
        <div className={Styles.loadingContainer}>
            {children}
            {loading ? (
            <div className={Styles.loadingCover}>
                <div className={Styles.loadingIcon}>
                <span></span>
                <span></span>
                <span></span>
                <span></span>
                <span></span>
                </div>
            </div>) : null}
        </div>
        )
    }
}